<template>
  <div class="nav-breadcrumb">
    <el-breadcrumb separator="/">
      <template v-for="item in breadcrumbList" :key="item.name">
        <el-breadcrumb-item :to="{ path: item.path }">
          {{ item.name }}</el-breadcrumb-item
        >
      </template>
    </el-breadcrumb>
  </div>
</template>

<script lang="ts">
import { defineComponent, PropType } from 'vue'
import { breadcrumbType } from '@/components/nav-breadcrumb/type/type'
export default defineComponent({
  name: 'nav-breadcrumb',
  props: {
    breadcrumbList: {
      type: Array as PropType<breadcrumbType[]>,
      default: () => []
    }
  },
  setup() {
    return {}
  }
})
</script>

<style lang="less" scoped>
.nav-breadcrumb {
  display: flex;
  align-items: center;
  height: 100%;
}
</style>
